import os
import os.path as osp
import cv2

img_dir = '/cv/lyh/models/stereo-dsgn2/outputs/cv_lyh_models_stereo-dsgn2_configs_stereo_kitti_models/dsgn2_wwdata_trans1127.stereo_trans1214/eval/eval_with_train/epoch_50/val/final_result/data'
# txt_file_path = '/cv/lyh/models/stereo-dsgn2/data/ww/ImageSets/train.txt'

# files= [line.strip('\n') for line in open(txt_file_path, 'r').readlines()]
files = os.listdir(img_dir)
for f in files:
    img_path = osp.join(img_dir, f)
    # if not os.path.exists(img_path):
    #     print(f)
    lines = [line for line in open(img_path, 'r').readlines()]
    if len(lines) >=1:
        print(f)

# img_path = '/cv/1dataset/ww/stereo_ww_datasets/training/1694637313250000.jpg'
# img = cv2.imread(img_path)
# cv2.imwrite('/cv/1dataset/ww/stereo_ww_datasets/training/1694637313250000.png', img)